import Vue from 'vue';
import Vuex from 'vuex';
import keepAlive from './modules/keepAlive';
import test from './modules/test';

Vue.use(Vuex);

const store = new Vuex.Store({
    modules: {
        keepAlive,
        test
    }
});

if (module.hot) {
    module.hot.accept(['./modules/keepAlive.js', './modules/test.js'], () => {
        store.hotUpdate({
            keepAlive: require('./modules/keepAlive.js').default,
            test: require('./modules/test.js').default
        });
    });
}

export default store;
